﻿using LdCommunication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LD.Common.PLC
{
    public interface IPLC
    {
        void Start(dynamic param);
        void Stop();
      
        OperateResult<byte[]> Read(string address, ushort val);
        OperateResult<bool[]> ReadBool(string address, ushort val);
        OperateResult<bool> ReadBool(string address);
        OperateResult<string> ReadString(string address, ushort val);
        OperateResult<int> ReadInt(string address);
        OperateResult<int[]> ReadInt(string address, ushort val);
        OperateResult<short> ReadInt16(string address);
        OperateResult<short[]> ReadInt16(string address, ushort val);
        OperateResult Write(string address, ushort val);
        OperateResult Write(string address, int val);
        OperateResult Write(string address, bool val);
        OperateResult Write(string address, string val);
        OperateResult Write(string address, byte[] val);
    }
}
